<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<script type="text/javascript">

Ext.onReady(function(){alert("ssss");
	Ext.QuickTips.init();
	
	var store = new Ext.data.JsonStore({
		url:'${ctx}/user/list.html?grid=true',
		root:'rows',
		idProperty:'id',
		totalProperty:'count',
		fields:['username','first_name','last_name','id']
	});
	
	var grid = new Ext.grid.GridPanel({
		title:'用户列表',
		columns:[
			{header:'username', width:30, dataIndex:'username', sortable:true}, 
			{header:'first_name',width:30,dataIndex:'first_name',sortable:true},
			{header:'last_name',width:30,dataIndex:'last_name',sortable:true},
			{header:'id',width:30,dataIndex:'id',sortable:true}
		],
		//autoExpandColumn:'username',
		renderTo: 'user_grid',
		loadMask:true,
		autoHeight:true,
		columnLines:true,
		store:store,
		bbar: new Ext.PagingToolbar({
            pageSize: 20,
            store: store,
            displayInfo: true,
            displayMsg: 'Displaying Records {0} - {1} of {2}',
            emptyMsg: "No Records"
        })
	});
	store.load({params:{start:0,limit:20,page:1}});
	
});

</script>
</head>
<body>
<div id="user_grid" style="width: 97%; height: 93%; margin: 5px 5px 0px 5px;"></div>

